﻿
Partial Class WebUserControls_CntDataCorrente
    Inherits System.Web.UI.UserControl

    Public Property DataCorrente As DateTime
        Set(value As DateTime)
            ViewState("DataCorrente") = value
        End Set
        Get
            If ViewState("DataCorrente") = DateTime.MinValue Then ViewState("DataCorrente") = DateTime.Now
            Return ViewState("DataCorrente")
        End Get
    End Property


    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            CaricaData()
        End If

    End Sub

    Public Sub CaricaData()
        LblGiorno.Text = DataCorrente.ToString("dddd<br/>d")
        LblMese.Text = DataCorrente.ToString("MMM")
    End Sub
End Class
